import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Power_Actual DataSet
power = pd.read_csv("/Users/apple/Downloads/Assignment for Data Scientist/power_actual_v - power_actual.csv")
power.head()
#shape of power
power.shape
#Summary of Power DataSet
power.describe()
Observed that "Power" variable is having some of the data points are in watt and most of them are Kilowatt. So, I have converted all the values into Kilowatt by using Excel.
#Removing unwanted Data Variables
power1=power.drop(["Unnamed: 0","ghi","gti","power"],axis=1)
power1.head()
#datetime conversion
power1['datetime'] = pd.to_datetime(power1.datetime)
power1.head()
power1['hours'] = power1['datetime'].dt.hour
power1.head()
power1['date'] = power1['datetime'].dt.date
power1.head()
power1.set_index('datetime',inplace=True)
power1['power1'].plot(figsize=(25,10)).plot(label='Power for every 15 mins')
plt.title('Power Generated From OCT 2017 - SEPT 2019 for every 15 mins')
plt.xlabel("Date Time")
plt.ylabel("Power Generated watts")
plt.legend()
power1['power1'].rolling(window=96).mean().plot(figsize=(25,10))
plt.title('rolling mean of ( 96 = 24 hours ) Power Generated From OCT 2017 - SEPT 2019 for every 15 mins')
plt.xlabel("Date Time")
plt.ylabel("Power Generated watts")
plt.legend()
power1['date'].nunique()
power1.dtypes
power1.info()
power1.isnull().sum()
# Finding number of null values by Plot
import missingno
missingno.matrix(power1, figsize = (10,3))
# Power if sumed up for each day by using groupby . so that we have one value for each day..reset_index()
power2=power1.groupby([power1['date']])['power1'].sum().to_frame()
power2
power2.shape
power2['power1'].nunique()
power2['power1'].describe()
#Histogam for "power"
power2["power1"].hist(figsize = (15,5), color='#F39C12')
#plt.label("power ")
plt.title("Histogram Power per day")
plt.xlabel("Power")
plt.ylabel("Count")
plt.show()
power2.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('Power Generated From OCT 2017 - SEPT 2019 for each day ')
plt.ylabel('Power per day (KW)')
# Rolling mean of 10 days
power_mean =power2['power1'].rolling(window=10).mean()
power_mean.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('Rolling mean of 10 days Power Generated From OCT 2017 - SEPT 2019 for each day')
plt.ylabel('Power per day (KW)')
weather = pd.read_csv("/Users/apple/Downloads/Assignment for Data Scientist/weather_actuals - weather_actuals.csv")
weather.head()
Replaced "-9999" with NaN value with the help of Google Spread Sheets.
weather.columns
weather.shape
weather.isnull().sum()
# Finding null values by Plot
missingno.matrix(weather, figsize = (15,3) )
weather.describe()
weather['wind_gust'].describe()
weather['heat_index'].describe()
weather['pressure'].describe()
weather1=weather.drop(["Unnamed: 0",'plant_id','wind_chill','heat_index','qpf','snow', 'pop', 'fctcode','precip_accumulation'],axis=1)
weather1.head()
weather1.columns
weather1.shape
weather1.info()
weather1.isnull().sum()
# Finding number of null values by Plot
missingno.matrix(weather1, figsize = (10,3))
from sklearn.impute import SimpleImputer
from numpy import nan
weather1['cloud_cover'] = weather1['cloud_cover'].fillna(0.23)
weather1['cloud_cover'].isnull().sum()
weather1['wind_bearing'] = weather1['wind_bearing'].fillna(188)
weather1['wind_bearing'].isnull().sum()
weather1['wind_speed'] = weather1['wind_speed'].fillna(2.63)
weather1['wind_speed'].isnull().sum()
weather1['wind_gust'] = weather1['wind_gust'].fillna(4.24)
weather1['wind_gust'].isnull().sum()
weather1['pressure'] = weather1['pressure'].fillna(1009.07)
weather1['pressure'].isnull().sum()
weather1['uv_index'] = weather1['uv_index'].fillna(1)
weather1['uv_index'].isnull().sum()
weather1['ozone'] = weather1['ozone'].fillna(274.4)
weather1['ozone'].isnull().sum()
weather1['precip_intensity'] = weather1['precip_intensity'].fillna(0.05)
weather1['precip_intensity'].isnull().sum()
weather1['precip_probability'] = weather1['precip_probability'].fillna(0.01)
weather1['precip_probability'].isnull().sum()
weather1['precip_type'].unique()
weather1['precip_type'] = weather1['precip_type'].fillna('no rain')
weather1['precip_type'].isnull().sum()
weather1['visibility'] = weather1['visibility'].fillna(12.2)
weather1['visibility'].isnull().sum()
weather1.isnull().sum()
# Finding number of null values by Plot
missingno.matrix(weather1, figsize = (10,3))
weather1.describe()
weather1.columns
#datetime conversion
weather1['datetime_utc'] = pd.to_datetime(weather1.datetime_utc)
weather1['datetime_local'] = pd.to_datetime(weather1.datetime_local)
weather1['sunrise'] = pd.to_datetime(weather1.sunrise)
weather1['sunset'] = pd.to_datetime(weather1.sunset)
weather1['updated_at'] = pd.to_datetime(weather1.updated_at)
weather1.head()
Act_weather=weather1.copy()
Act_weather.head()
Act_weather.shape
Act_weather=Act_weather.drop(["datetime_utc","sunrise","sunset","updated_at"],axis=1)
Act_weather.head()
Act_weather['date'] = Act_weather['datetime_local'].dt.date
Act_weather.head()
Act_weather['datetime_local'].nunique()
Act_weather['date'].nunique()
Act_weather.columns
Act_weather_df = Act_weather.groupby(['date'])[['cloud_cover', 'apparent_temperature', 'temperature',
'humidity', 'dew_point', 'wind_bearing', 'wind_speed', 'wind_gust',
'pressure', 'uv_index', 'ozone', 'precip_intensity',
'precip_probability', 'visibility']].mean()
Act_weather_df.head()
Act_weather_df.to_csv('Act_weather_df.csv')
Act_weather_df.shape
Act_weather_df1 = Act_weather.groupby(['date'])[['precip_type', 'icon', 'summary']].max()
Act_weather_df1
Actual_weather=Act_weather_df.join(Act_weather_df1)
Actual_weather.head()
# joining Actual_weather and Actual_Power Datasets
dataframe=Actual_weather.join(power2)
dataframe.head()
dataframe.shape
from sklearn.preprocessing import LabelEncoder
labelencoder=LabelEncoder()
dataframe['icon']=labelencoder.fit_transform(dataframe['icon'])
dataframe['summary']=labelencoder.fit_transform(dataframe['summary'])
dataframe=pd.get_dummies(dataframe,columns=["precip_type"],drop_first=True)
dataframe.head()
dataframe.columns
dataframe.dtypes
# Finding number of null values by Plot
missingno.matrix(dataframe, figsize = (10,3))
#pairplot
sns.pairplot(dataframe)
dataframe['cloud_cover'].plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('cloud_cover From OCT 2017 - SEPT 2019 ')
plt.ylabel('Cloud unit measure ( okta )')
cloud_mean =dataframe['cloud_cover'].rolling(window=10).mean()
cloud_mean.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('cloud_cover From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('Cloud unit measure ( okta )')
apparent_temperature =dataframe['apparent_temperature'].rolling(window=30).mean()
temperature =dataframe['temperature'].rolling(window=10).mean()
apparent_temperature.plot(grid=True, figsize=(25,10), legend=True, color='#2980B9')
temperature.plot(grid=True, figsize=(25,10), legend=True, color='#E74C3C')
plt.title('apparent_temperature vs Temperature From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('Temperature (Celcius)')
humidity =dataframe['humidity'].rolling(window=10).mean()
humidity.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('humidity From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('humidity value')
dew_point =dataframe['dew_point'].rolling(window=10).mean()
dew_point.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('dew_point From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('dew_point (celcius)')
wind_speed =dataframe['wind_speed'].rolling(window=10).mean()
wind_speed.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('wind_speed From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('wind_speed (Km/h)')
wind_gust =dataframe['wind_gust'].rolling(window=10).mean()
wind_gust.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('wind_gust From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('wind_gust (m/s)')
pressure =dataframe['pressure'].rolling(window=10).mean()
pressure.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('pressure From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('pressure (Hectapascal (hPa))')
uv_index =dataframe['uv_index'].rolling(window=10).mean()
uv_index.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('uv_index From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('uv_index ')
ozone =dataframe['ozone'].rolling(window=10).mean()
ozone.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('ozone From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('ozone value ')
precip_intensity =dataframe['precip_intensity'].rolling(window=10).mean()
precip_intensity.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('precip_intensity From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('precip_intensity (mm/h) ')
precip_probability =dataframe['precip_probability'].rolling(window=10).mean()
precip_probability.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('precip_probability From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('precip_probability (%) ')
visibility =dataframe['visibility'].rolling(window=10).mean()
visibility.plot(grid=True, figsize=(25,10), legend=True, color='#EC7063')
plt.title('visibility From OCT 2017 - SEPT 2019 for every 10 days ')
plt.ylabel('visibility ')
# Correlation with power
dataframe.corr()['power1']
import seaborn as sns
corr=dataframe.iloc[:,:-1].corr()
top_features=corr.index
plt.figure(figsize=(20,20))
sns.heatmap(dataframe[top_features].corr(),annot=True)
X=dataframe.drop(['power1'],axis=1)
y=dataframe['power1']
from sklearn.feature_selection import mutual_info_regression
mutual_info=mutual_info_regression(X,y)
mutual_data=pd.Series(mutual_info,index=X.columns)
mutual_data.sort_values(ascending=False)
threshold=0.8
# find and remove correlated features
def correlation(dataset, threshold):
col_corr = set() # Set of all the names of correlated columns
corr_matrix = dataset.corr()
for i in range(len(corr_matrix.columns)):
for j in range(i):
if abs(corr_matrix.iloc[i, j]) > threshold: # we are interested in absolute coeff value
colname = corr_matrix.columns[i] # getting the name of column
col_corr.add(colname)
return col_corr
correlation(X,threshold)
from sklearn.ensemble import ExtraTreesRegressor
import matplotlib.pyplot as plt
model=ExtraTreesRegressor()
model.fit(X,y)
print(model.feature_importances_)
ranked_features=pd.Series(model.feature_importances_,index=X.columns)
ranked_features.nlargest(10).plot(kind='barh')
plt.show()
dataframe.columns
final_weather=pd.DataFrame(dataframe,columns=['humidity','uv_index', 'ozone','temperature','visibility', 'wind_bearing', 'pressure','apparent_temperature','wind_gust','precip_probability','power1'])
final_weather.head()
wf=pd.read_csv("/Users/apple/Downloads/Assignment for Data Scientist/weather_forecast.csv")
wf.head()
wf.shape
wf.isnull().sum()
# Finding number of null values by Plot
missingno.matrix(wf, figsize = (10,3))
wf=wf.drop(["Unnamed: 0",'plant_id','wind_chill','heat_index','qpf','snow', 'pop', 'fctcode','precip_accumulation'],axis=1)
wf.head()
# Finding number of null values by Plot
missingno.matrix(wf, figsize = (10,3))
wf['precip_type'].unique()
wf['precip_type'] = wf['precip_type'].fillna('no rain')
wf.columns
wf['datetime_utc'] = pd.to_datetime(wf.datetime_utc)
wf['datetime_local'] = pd.to_datetime(wf.datetime_local)
wf['sunrise'] = pd.to_datetime(wf.sunrise)
wf['sunset'] = pd.to_datetime(wf.sunset)
wf['updated_at'] = pd.to_datetime(wf.updated_at)
wf.head()
wf['date']=wf['datetime_utc'].dt.date
For_date=wf['date']
For_date
For_weather=wf.copy()
For_weather=For_weather.drop(["datetime_utc","sunrise","sunset","updated_at"],axis=1)
For_weather.head()
For_weather_df = For_weather.groupby(['date'])['cloud_cover', 'apparent_temperature', 'temperature',
'humidity', 'dew_point', 'wind_bearing', 'wind_speed', 'wind_gust',
'pressure', 'uv_index', 'ozone', 'precip_intensity',
'precip_probability', 'visibility'].mean().reset_index()
For_weather_df.head()
forecast_date=For_weather_df.iloc[:,0:1]
forecast_date.head()
For_weather_df.set_index('date',inplace=True)
For_weather_df.head()
For_weather_df1 = For_weather.groupby(['date'])[['precip_type', 'icon', 'summary']].max()
Forecast_weather=For_weather_df.join(For_weather_df1)
Forecast_weather.head()
Forecast_weather['icon']=labelencoder.fit_transform(Forecast_weather['icon'])
Forecast_weather['summary']=labelencoder.fit_transform(Forecast_weather['summary'])
Forecast_weather=pd.get_dummies(Forecast_weather,columns=["precip_type"],drop_first=True)
Forecast_weather.head()
# Finding number of null values by Plot
missingno.matrix(Forecast_weather, figsize = (10,3))
# Pairplot
sns.pairplot(Forecast_weather)
ff_weather=pd.DataFrame(Forecast_weather,columns=['humidity','uv_index', 'ozone','temperature','visibility', 'wind_bearing', 'pressure','apparent_temperature','wind_gust','precip_probability'])
ff_weather.head()
ff_weather.shape
x_train=final_weather.iloc[:,:-1]
y_train=final_weather.iloc[:,-1:]
x_train.head()
y_train.head()
from sklearn import preprocessing
n_x_train=preprocessing.normalize(x_train)
n_x_train
n_ff_weather=preprocessing.normalize(ff_weather)
n_ff_weather
from sklearn.decomposition import PCA
pca = PCA(n_components=3)
lr_pca=pca.fit(n_x_train)
lr_pca
from sklearn.linear_model import LinearRegression
regression=LinearRegression()
regression.fit(n_x_train,y_train)
y_pred_lr=regression.predict(n_ff_weather)
y_pred_lr
score_lr=regression.score(n_ff_weather,y_pred_lr)
score_lr
#from sklearn.metrics import mean_squared_error
#mean_squared_error(y_train,y_pred_lr)
lr_Power=pd.DataFrame(y_pred_lr,columns=['LRF_Power'])
lr_Power.head()
# joining forecast_date and lr_Power Datasets
lr_fp=forecast_date.join(lr_Power)
lr_fp.head()
lr_fp.to_csv('Linear_Regression_Result.csv')
lr_fp.set_index('date',inplace=True)
lr_fp.head()
# Power Generated from 1st oct 2019 - 27th oct 2019
final_weather['power1'].plot(grid=True, figsize=(25,10), label='Power (oct 2017 - sept 2019)', color='#2980B9')
lr_fp['LRF_Power'].plot(grid=True, figsize=(25,10), label='Forecasted Power (1st oct 2019 - 27th oct 2019) ', color='#E74C3C')
plt.title('Forecasted Linear Regression Power Generated from 1st oct 2019 - 27th oct 2019')
plt.xlabel("Date")
plt.ylabel("Power (Kw/h)")
plt.legend()
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.ensemble import RandomForestRegressor
# Create a pipeline
pipe = Pipeline([("regressor", RandomForestRegressor())])
# hyperparameters
grid_param = [
{"regressor": [RandomForestRegressor()],
"regressor__n_estimators": [10, 100, 1000],
"regressor__max_depth":[5,8,15,25,30,None],
"regressor__min_samples_leaf":[1,2,5,10,15,100],
"regressor__max_leaf_nodes": [2, 5,10]}]
RF_model = GridSearchCV(pipe, grid_param, cv=5, verbose=0,n_jobs=-1) # Fit grid search
RF_model.fit(x_train,y_train)
print(RF_model.best_estimator_)
y_pred_RF=RF_model.predict(ff_weather)
y_pred_RF
score_RF=RF_model.score(ff_weather,y_pred_RF)
score_RF
RF_FPower=pd.DataFrame(y_pred_RF,columns=['RFF_Power'])
RF_FPower.head()
# joining forecast_date and RF_FPower Datasets
RF_fp=forecast_date.join(RF_FPower)
RF_fp.head()
RF_fp.to_csv('RandomForest_Result.csv')
RF_fp.set_index('date',inplace=True)
RF_fp.head()
# Power Generated from 1st oct 2019 - 27th oct 2019
final_weather['power1'].plot(grid=True, figsize=(25,10), label='Power (oct 2017 - sept 2019)', color='#2980B9')
RF_fp['RFF_Power'].plot(grid=True, figsize=(25,10), label='Forecasted Power (1st oct 2019 - 27th oct 2019) ', color='#E74C3C')
plt.title('Random Forest Power Generated from 1st oct 2019 - 27th oct 2019')
plt.xlabel("Date")
plt.ylabel("Power (Kw/h)")
plt.legend()
import xgboost as xgb
# Create a pipeline
pipe = Pipeline([("regressor", xgb.XGBRegressor())])
# Create dictionary with candidate learning algorithms and their hyperparameters
grid_param = [
{"regressor": [xgb.XGBRegressor()],
"regressor__n_estimators": [10, 50, 100],
"regressor__max_depth":[5,8,15,25,30,None],
"regressor__learning_rate":[0,0.1,0.2,0.3,0.5,0.8,1],
}]
# create a gridsearch of the pipeline, the fit the best model
XGB_model = GridSearchCV(pipe, grid_param, cv=5, verbose=0,n_jobs=-1) # Fit grid search
XGB_model.fit(x_train,y_train)
print(XGB_model.best_estimator_)
y_pred_XGB=XGB_model.predict(ff_weather)
y_pred_XGB
score_XGB=XGB_model.score(ff_weather,y_pred_XGB)
score_XGB
#rmse = np.sqrt(mean_squared_error(y_train,y_pred_XGB))
XGB_FPower=pd.DataFrame(y_pred_XGB,columns=['XGB_Power'])
XGB_FPower.head()
# joining forecast_date and XGB_FPower Datasets
XGB_fp=forecast_date.join(XGB_FPower)
XGB_fp.head()
XGB_fp.to_csv('XGBoost1_Result.csv')
XGB_fp.set_index('date',inplace=True)
XGB_fp.head()
# Power Generated from 1st oct 2019 - 27th oct 2019
final_weather['power1'].plot(grid=True, figsize=(25,10), label='Power (oct 2017 - sept 2019)', color='#2980B9')
XGB_fp['XGB_Power'].plot(grid=True, figsize=(25,10), label='Forecasted Power (1st oct 2019 - 27th oct 2019) ', color='#E74C3C')
plt.title('XGBoost Power Generated from 1st oct 2019 - 27th oct 2019')
plt.xlabel("Date")
plt.ylabel("Power (Kw/h)")
plt.legend()
from sklearn.svm import SVR
# Create a pipeline
svm_pipe = Pipeline([("regressor", SVR())])
# Create hyperparameters
grid_param = [
{"regressor": [SVR()],
"regressor__kernel": ['linear', 'poly','rbf'],
"regressor__gamma": [1e-4, 1e-3, 0.01, 0.1, 0.2, 0.5, 0.6, 0.9],
"regressor__C": [1, 10, 100, 1000, 10000],
}]
SVM_model = GridSearchCV(svm_pipe, grid_param, cv=5, verbose=0,n_jobs=-1) # Fit grid search
SVM_model.fit(n_x_train,y_train)
print(SVM_model.best_estimator_)
y_pred_SVM=SVM_model.predict(n_ff_weather)
y_pred_SVM
score_SVM=SVM_model.score(n_ff_weather,y_pred_SVM)
score_SVM
SVM_FPower=pd.DataFrame(y_pred_SVM,columns=['SVM_Power'])
SVM_FPower.head()
# joining forecast_date and SVM_Forecasted Power Datasets
SVM_fp=forecast_date.join(SVM_FPower)
SVM_fp.head()
SVM_fp.to_csv('SVR_Result.csv')
SVM_fp.set_index('date',inplace=True)
SVM_fp.head()
# Power Generated from 1st oct 2019 - 27th oct 2019
final_weather['power1'].plot(grid=True, figsize=(25,10), label='Power (oct 2017 - sept 2019)', color='#2980B9')
SVM_fp['SVM_Power'].plot(grid=True, figsize=(25,10), label='Forecasted Power (1st oct 2019 - 27th oct 2019) ', color='#E74C3C')
plt.title('SVM Power Generated from 1st oct 2019 - 27th oct 2019')
plt.xlabel("Date")
plt.ylabel("Power (Kw/h)")
plt.legend()
ARMA - Autoregression (P) Integrated (d) Moving Average(q)
#plot_acf & plot_pacf
from statsmodels.graphics.tsaplots import plot_acf,plot_pacf
#plot_acf - (q)
#plot_pacf - (p)
plot_acf(final_weather['power1'])
plot_pacf(final_weather['power1'])
p = 3 ; d=1 ; q = 9 ; [ d=0(no stationarity ) d=1(stationarity ) ]
#Seasonal AutoRegressive Integrated Moving Average with eXogenous regressors model [SARIMAX]
import statsmodels.api as sm
SARIMA_model=sm.tsa.statespace.SARIMAX(final_weather['power1'],order=(3, 1, 9),seasonal_order=(1,1,1,9))
results=SARIMA_model.fit()
SARIMA_FPower=results.predict(start=568,end=597,dynamic=True)
SARIMA_FPower
SARIMA_FPower.to_csv('SARIMAA_Result.csv')
from sklearn.neural_network import MLPRegressor
# Create a pipeline
MLP_pipe = Pipeline([("regressor", MLPRegressor())])
# Create hyperparameters
grid_param = [
{"regressor": [MLPRegressor()],
"regressor__activation": ['relu','identity', 'tanh','logistic'],
"regressor__solver": ['lbfgs','sgd', 'adam'],
"regressor__learning_rate": ['constant','invscaling','adaptive'],
"regressor__max_iter":[200,300,400,500,1000]
}]
MLP_model = GridSearchCV(MLP_pipe, grid_param, cv=5, verbose=0,n_jobs=-1) # Fit grid search
MLP_model.fit(n_x_train,y_train)
print(MLP_model.best_estimator_)
y_pred_MLP=MLP_model.predict(n_ff_weather)
y_pred_MLP
score_MLP=MLP_model.score(n_ff_weather,y_pred_MLP)
score_MLP
MLP_FPower=pd.DataFrame(y_pred_MLP,columns=['MLP_Power'])
MLP_FPower.head()
# joining forecast_date and MLP_FPower Power Datasets
MLP_fp=forecast_date.join(MLP_FPower)
MLP_fp.head()
MLP_fp.to_csv('MLP_result.csv')
MLP_fp.set_index('date',inplace=True)
MLP_fp.head()
# Power Generated from 1st oct 2019 - 27th oct 2019
final_weather['power1'].plot(grid=True, figsize=(25,10), label='Power (oct 2017 - sept 2019)', color='#2980B9')
MLP_fp['MLP_Power'].plot(grid=True, figsize=(25,10), label='Forecasted Power (1st oct 2019 - 27th oct 2019) ', color='#E74C3C')
plt.title('MLP Power Generated from 1st oct 2019 - 27th oct 2019')
plt.xlabel("Date")
plt.ylabel("Power (Kw/h)")
plt.legend()